/*
 * widgets.js
 * add some default optional js actions associated to css classes
 * depend only from ovidentia.js
 */
 
window.babAddonWidgets = new Object();

/**
 * @param	string	metaname
 * @param	arr		Object
 * @return Object
 */
window.babAddonWidgets.addMetadata = function(metaname, arr) {

	if (typeof window.babAddonWidgets.metadata == 'undefined') {
		window.babAddonWidgets.metadata = {};
	}

	window.babAddonWidgets.metadata[metaname] = arr;
}


/**
 * @param	string	metaname
 * @return Object
 */
window.babAddonWidgets.getMetadata = function(metaname) {

	if (typeof window.babAddonWidgets.metadata == 'undefined' || typeof window.babAddonWidgets.metadata[metaname] == 'undefined') {
		return {};
	}

	return window.babAddonWidgets.metadata[metaname];
}
